<?php

class AlipayAction extends Action  {
	public function Index(){
		
		$order = M('user')->where()->order('userId asc')->select();
		$arr = array();
		foreach ($order as $key => $v){
			$arr[$key]['userId'] = $v['userId'];
			$arr[$key]['userName'] = $v['userName'];
			$arr[$key]['mobile'] = $v['mobile'];
			$where['userId']  = $v['userId'];
			$where['orderStatus'] =  array('neq',3);
			$where['_logic'] = 'AND';
			$user = M('order')->where($where)->select();
			$arr[$key]['status'] = isset($user) ? 1 : 0 ;
			
			
		};
		
		
		$this->assign(user,$arr);
		$this->display();
	}
	
	
}